package com.ldu.controller;

import com.ldu.pojo.Notice;
import com.ldu.service.NoticeService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping(value = "admin/notice")
public class NoticeController {

    @Resource
    private NoticeService noticeService;

    @RequestMapping(value = "/getNotice")
    @ResponseBody
    public List<Notice> getNotice(){
        return noticeService.getAllNoticeList();
    }
    @RequestMapping(value = "/noticeList")
    public String toAllNoticeList(){
        return "admin/notice/notice_list";
    }


}
